package org.example.forum.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.forum.model.ArticleReply;

import java.util.List;

@Mapper
public interface ArticleReplyMapper {
    int insert(ArticleReply record);

    int insertSelective(ArticleReply record);

    ArticleReply selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ArticleReply record);

    int updateByPrimaryKey(ArticleReply record);

    /**
     * 根据帖子id查询所有回复
     * @param articleId 帖子id
     * @return 回复
     */
    List<ArticleReply> selectByArticleId(@Param("articleId") Long articleId);
}